<?php
$mp3 = "";
$mp3_title = "Pasaka apie karvę MP3";

$foto = pic("http://prikola.net/pic/selection/".date('n')."/".(date('j')).".1.jpg",120);
//$foto = "";
$foto_url = "http://prikola.net/pic/selection/".date('n')."/".(date('j')).".jpg";
/*
$foto_d = (13395 + date('j'));
$foto_url = "http://www.dofiga.net/photos/tn_small_".$foto_d.".jpg";
$foto = "http://dofiga.net/photos/".$foto_d.".jpg";*/

$girl = pic("http://www.frontlinedd.com/images/botd/babe".(date('Ymd')-1).".jpg",120);
$girl_url = "http://www.frontlinedd.com/images/botd/babe".(date('Ymd')-1).".jpg";

$string = pic("http://www.frontlinedd.com/images/totd/thong".(date('Ymd')-1).".jpg",120);
$string_url = "http://www.frontlinedd.com/images/totd/thong".(date('Ymd')-1).".jpg";

//$video_title = "Rusiškas CS";
//$video = "5925864301745122350";

$wall_title = "Darbastalio fonas";
$wall = pic("http://www.gamewallpapers.com/wallpaperoftheday/wallpaperoftheday.jpg",120);
$wall_url = "http://www.gamewallpapers.com/wallpaperoftheday/getpreview.php";

//$sxe = "http://www.flickr.com/services/rest/?method=flickr.interestingness.getList&api_key=f26a2caabe161bf0273fb532bde61078&per_page=1&page=".rand(1,500)."";
$sxe = "";

$info = "<center>";

if (!empty($mp3)) { 
	$info .= "<b>Mėnesio MP3</b><br/>
	$mp3_title <br/>
	<object type=\"application/x-shockwave-flash\" data=\"stilius/play.swf?src=$mp3\" align=\"center\" height=\"51\" width=\"155\"><param name=\"movie\" value=\"stilius/play.swf?src=$mp3\"></object>
	<hr/>";
}

if (!empty($foto)) { 
	$info .= "
	<div id=\"fonas3\"><b>Dienos pokštas</b><br/>
	<a href=\"javascript:gwGetPreview('".$foto_url."','500','500');\"><img src='".$foto."' border='0' alt='fun' onError=\"document.all.fonas3.style.display='none'\"/></a></div>
	<hr/>"; 
}
if (!empty($girl)) { 
	$info .= "
	<div id=\"fonas2\"><b>Dienos mergaitė</b><br>
	<a href=\"javascript:gwGetPreview('".$girl_url."','500','500');\">
	<img src=\"".$girl."\" width='120' border='0' onError=\"document.all.fonas2.style.display='none'\"></a></div>
	<hr/>"; 
}
if (!empty($string)) { 
	$info .= "
	<div id=\"fonas2\"><b>Dienos stringai</b><br>
	<a href=\"javascript:gwGetPreview('".$string_url."','500','500');\">
	<img src=\"".$string."\" width='120' border='0' onError=\"document.all.fonas2.style.display='none'\"></a></div>
	<hr/>"; 
}
if (!empty($wall)) {
	$info .= "
	<div id=\"fonas1\">
	<b>".$wall_title."</b><br/>
	<a href=\"javascript:gwGetPreview('".$wall_url."','400','330');\">
	<img src='".$wall."' width='120' height='90' border='0' onError=\"document.all.fonas1.style.display='none'\"></a></div>
	<hr/>
";
}

if (!empty($sxe)) {
	$sxe = new SimpleXMLElement($sxe, NULL, TRUE);
	$sxe = simplexml_load_string($sxe->photos[0]->photo[0]->asXML());
	$info .= "
	<div id=\"fonas5\">
	<b>Akimirka:<br/><a href=\"http://www.flickr.com/photos/".$sxe['owner']."/".$sxe['id']."/\" target=\"_blank\" >".trimlink($sxe['title'],20)."</a></b><br/>
	<a href=\"javascript:gwGetPreview('http://farm1.static.flickr.com/".$sxe['server']."/".$sxe['id']."_".$sxe['secret'].".jpg','520','520');\">
	<img src=\"http://farm1.static.flickr.com/".$sxe['server']."/".$sxe['id']."_".$sxe['secret']."_t.jpg\" alt=\"".$sxe['title']."\" border=\"0\" onError=\"document.all.fonas5.style.display='none'\" />
	</a></div>
	<hr/>
";
}

if (!empty($video)) { 
	$info .= "
	<b>Mėnesio Video</b><br/>
	$video_title <br/>
	<object type=\"application/x-shockwave-flash\" data=\"http://video.google.com/googleplayer.swf?docId=$video&amp;hl=en\" width=\"120\" height=\"100\">
	<param name=\"movie\" value=\"http://video.google.com/googleplayer.swf?docId=$video&amp;hl=en\" />
	<param name=\"FlashVars\" value=\"playerMode=simple\" />
	<param name=\"allowScriptAccess\" value=\"sameDomain\" />
	</object><br/>
	<a href=\"http://video.google.com/videoplay?docid=$video\" target=\"_blank\">Žiūrėti pilnu dydžiu</a>
	<!-- <embed style=\"width:120px; height:100px;\" id=\"VideoPlayback\" type=\"application/x-shockwave-flash\" src=\"http://video.google.com/googleplayer.swf?docId=$video&hl=en&loop=true&playerMode=simple\" flashvars=\"\"></embed> -->
	<hr/>";
}
$info .= "<a href='?id,45;n,1;u,FDisk'>Turi kanors įdomaus?</a>";
$info .= "<script>function gwGetPreview(url,w,h) {
	window.open(url,'_blank','fullscreen=no,resizable=no,scrollbars=no,toolbar=no,height='+h+',width='+w+'');
}
</script>\n
</center>";
hide("Įdomybių skyrelis",$info,true,false,"idomu");

?>